<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePuntoRuta extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('punto_ruta', function (Blueprint $table) {
            $table->increments('id_punto_ruta');
            $table->float('latitud');
            $table->float('longitud');
            $table->integer('id_ruta');
            
            //            $table->primary('id_punto_ruta');
            $table->foreign('id_ruta')->references('id_ruta')->on('ruta');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('punto_ruta');
    }
}
